<? if (isset($filename)): ?>
    <img src="<?=base_url("images/uploads/$filename");?>" class="<?=$css_class?>"/>
<? else: ?>
    <img src="<?=base_url("images/no_avatar.jpg");?>" class="<?=$css_class?>"/>
<? endif; ?>
